package org.vincen.client5;

import java.util.concurrent.ExecutionException;

import javax.xml.ws.AsyncHandler;
import javax.xml.ws.Response;

import org.apache.hello_world_async_soap_http.types.GreetMeSometimeResponse;

public class GreetMeSometimeAsyncHandler implements
		AsyncHandler<GreetMeSometimeResponse> {

	GreetMeSometimeResponse reply = null;

	@Override
	public void handleResponse(Response<GreetMeSometimeResponse> res) {
		try {
			reply = res.get();
			System.out.println(reply.getResponseType());
		} catch(ExecutionException | InterruptedException e){
			e.printStackTrace();
		}
	}

	public String getResponse() {
		return reply.getResponseType();
	}
}
